package com.gljx.util;

/**
 * Created by LXX on 2018-03-12.
 */
public class stateToString {

    /**
     * @param type 转成对应的类型
     * @return
     */
    public static String carType(Long type) {
        String string;
        if (type == 1) {
            string = "年检";
        } else if (type == 2) {
            string = "交强险";
        } else if (type == 3) {
            string = "商业险";
        } else if (type == 4) {
            string = "二级维护";
        } else if (type == 5) {
            string = "综检";
        } else if (type == 6) {
            string = "科目三通行证";
        } else {
            string = null;
        }
        return string;
    }

    /**
     * 获取单据状态
     *
     * @param type
     * @return
     */
    public static String billsState(Integer type) {
        String string;
        if (type == null) {
            string = null;
        } else if (type == 3) {
            string = "保存";
        } else if (type == 4) {
            string = "提交";
        } else if (type == 5) {
            string = "审核";
        } else {
            string = null;
        }
        return string;
    }

    /**
     * 获取单据状态 Long
     *
     * @param type
     * @return
     */
    public static String billsState(Long type) {
        String string;
        if (type == null) {
            string = null;
        } else if (type == 3) {
            string = "保存";
        } else if (type == 4) {
            string = "提交";
        } else if (type == 5) {
            string = "审核";
        } else {
            string = null;
        }
        return string;
    }

    /**
     * 员工类型
     *
     * @param type
     * @return
     */
    public static String personType(Long type) {
        String string;
        if (type == null) {
            string = null;
        } else if (type == 1) {
            string = "办公室职员";
        } else if (type == 2) {
            string = "教练";
        } else {
            string = "其他";
        }
        return string;
    }

    /**
     * 性别
     *
     * @param sex
     * @return
     */
    public static String sex(Long sex) {
        String string;
        if (sex == null) {
            string = null;
        } else if (sex == 1) {
            string = "男";
        } else {
            string = "女";
        }
        return string;
    }

    /**
     * 判断是否
     *
     * @param whether
     * @return
     */
    public static String whether(Long whether) {
        String string;
        if (whether == null) {
            string = "否";
        } else if (whether == 1) {
            string = "是";
        } else {
            string = "否";
        }
        return string;
    }


    /**
     * @Author lcx
     * @Date 2018/3/13 0013 上午 10:36
     * 判断vip
     */
    public static String cfstuvip(Long whether) {
        String string;
        if (whether == null) {
            string = null;
        } else if (whether == 0) {
            string = "是";
        } else {
            string = "否";
        }
        return string;
    }

    /**
     * @Author lcx
     * @Date 2018/3/13 0013 下午 3:57
     * 车辆维修的维修类型
     */
    public static String cfdepartmentName(String cfdepartmentName) {
        String string;
        if (cfdepartmentName == null) {
            string = null;
        } else if ("1".equals(cfdepartmentName)) {
            string = "正常维修";
        } else if ("2".equals(cfdepartmentName)) {
            string = "事故维修";
        } else {
            string = "公交车维修";
        }
        return string;
    }

    /**
     * 科目
     *
     * @param subject
     * @return
     */
    public static String subject(Long subject) {
        String string;
        if (subject == null) {
            string = null;
        } else if (subject == 1) {
            string = "科目一";
        } else if (subject == 2) {
            string = "科目二";
        } else if (subject == 3) {
            string = "科目三";
        } else {
            string = null;
        }
        return string;
    }

    /**
     * @Author lcx
     * @Date 2018/3/13 0013 上午 9:59
     * 本地异地判断
     */
    public static String cfbdyd(Long cfbdyd) {
        String string;
        if (cfbdyd == null) {
            string = null;
        } else if (cfbdyd == 1) {
            string = "本地";
        } else if (cfbdyd == 2) {
            string = "异地";
        } else if (cfbdyd == 3) {
            string = "无";
        } else {
            string = null;
        }
        return string;
    }

    public static String cfsubresult(String cfsubresult) {
        String string;
        if (cfsubresult == null) {
            string = null;
        } else if ("1".equals(cfsubresult)) {
            string = "预约成功";
        } else if ("2".equals(cfsubresult)) {
            string = "预约失败";
        } else {
            string = null;
        }
        return string;
    }


    /**
     * 学员状态
     *
     * @param state
     * @return
     */
    public static String studentState(Long state) {
        String string;
        if (state == null) {
            string = null;
        } else if (state == 1) {
            string = "已报名";
        } else if (state == 2) {
            string = "科目一通过";
        } else if (state == 3) {
            string = "科目一未通过";
        } else if (state == 4) {
            string = "科目二通过,科目三未开始";
        } else if (state == 5) {
            string = "科目二未通过,科目三未开始";
        } else if (state == 6) {
            string = "科目二练车中,科目三未开始";
        } else if (state == 7) {
            string = "科目三通过,科目二通过";
        } else if (state == 8) {
            string = "科目三未通过,科目二通过";
        } else if (state == 9) {
            string = "科目三练车中,科目二通过";
        } else if (state == 10) {
            string = "已结业";
        } else if (state == 11) {
            string = "已退学";
        } else if (state == 12) {
            string = "模拟考试合格";
        } else if (state == 13) {
            string = "已过期";
        } else if (state == 14) {
            string = "作废";
        } else if (state == 15) {
            string = "科目三练车中,科目二未通过";
        } else if (state == 16) {
            string = "科目三练车中,科目二未开始";
        } else if (state == 17) {
            string = "科目三通过,科目二未通过";
        } else if (state == 18) {
            string = "科目三通过,科目二练车中";
        } else if (state == 19) {
            string = "科目三通过,科目二未开始";
        } else if (state == 20) {
            string = "科目二未通过,科目三未通过";
        } else if (state == 21) {
            string = "科目三未通过，科目二未开始";
        } else if (state == 22) {
            string = "科目二练车中,科目三未通过";
        } else {
            string = null;
        }
        return string;
    }

    /**
     * 收费类型
     *
     * @param chargetype
     * @return
     */
    public static String chargetype(Long chargetype) {
        String string;
        if (chargetype == null) {
            string = null;
        } else if (chargetype == 1) {
            string = "自带车训练";
        } else if (chargetype == 2) {
            string = "考前模拟";
        } else if (chargetype == 3) {
            string = "委培";
        } else {
            string = null;
        }
        return string;
    }
}
